import { Component, OnInit, Input, Output, OnChanges } from '@angular/core';
import { FormsModule } from '@angular/forms';

@Component({
  selector: 'app-list3',
  templateUrl: './list3.component.html',
  styleUrls: ['./list3.component.scss']
})
export class List3Component implements OnInit {

  @Input() c6: number;
  @Input() d6: number;
  @Output() e6: number;
  @Output() f6: number;
  @Output() g6: number;
  @Input() h6: number;
  @Output() i6: number;
  @Output() j6: number;
  @Output() k6: number;

  @Input() c7: number;
  @Input() d7: number;
  @Output() e7: number;
  @Output() f7: number;
  @Output() g7: number;
  @Input() h7: number;
  @Output() i7: number;
  @Output() j7: number;
  @Output() k7: number;

  @Input() c8: number;
  @Input() d8: number;
  @Output() e8: number;
  @Output() f8: number;
  @Output() g8: number;
  @Input() h8: number;
  @Output() i8: number;
  @Output() j8: number;
  @Output() k8: number;

  @Input() c9: number;
  @Input() d9: number;
  @Output() e9: number;
  @Output() f9: number;
  @Output() g9: number;
  @Input() h9: number;
  @Output() i9: number;
  @Output() j9: number;
  @Output() k9: number;

  @Input() c10: number;
  @Input() d10: number;
  @Output() e10: number;
  @Output() f10: number;
  @Output() g10: number;
  @Input() h10: number;
  @Output() i10: number;
  @Output() j10: number;
  @Output() k10: number;

  @Input() c11: number;
  @Input() d11: number;
  @Output() e11: number;
  @Output() f11: number;
  @Output() g11: number;
  @Input() h11: number;
  @Output() i11: number;
  @Output() j11: number;
  @Output() k11: number;

  @Output() c12: number;
  @Output() d12: number;
  @Output() e12: number;
  @Input() f12: number;
  @Output() g12: number;
  @Output() i12: number;
  @Output() j12: number;
  @Output() k12: number;

  @Output() i13: number;
  @Output() j13: number;
  @Output() k13: number;

  constructor() { }

  ngOnInit() {
    this.c6 = 67.69;
    this.d6 = -10.00;
    this.h6 = 880.87;

    this.c7 = 13.80;
    this.d7 = 10.00;
    this.h7 = 959.99;

    this.c8 = 10.00;
    this.d8 = 0.00;
    this.h8 = 889.98;

    this.c9 = 6.00;
    this.d9 = 0.00;
    this.h9 = 802.88;
    
    this.c10 = 2.40;
    this.d10 = 0.00;
    this.h10 = 729.61;

    this.c11 = 0.11;
    this.d11 = 0.00;
    this.h11 = 512.12;

    this.f12 = 218;
    this.g12 = this.f12;

    this.recal();
  }

  recal(){
    this.e6 = this.c6 + this.d6;
    this.f6 = this.g12 * (this.c6 / 100);
    this.g6 = this.g12 * (this.e6 / 100);
    this.i6 = this.f6 * this.h6;
    this.j6 = this.g6 * this.h6;
    this.k6 = this.j6 - this.i6;

    this.e7 = this.c7 + this.d7;
    this.f7 = this.g12 * (this.c7 / 100);
    this.g7 = this.g12 * (this.e7 / 100);
    this.i7 = this.f7 * this.h7;
    this.j7 = this.g7 * this.h7;
    this.k7 = this.j7 - this.i7;

    this.e8 = this.c8 + this.d8;
    this.f8 = this.g12 * (this.c8 / 100);
    this.g8 = this.g12 * (this.e8 / 100);
    this.i8 = this.f8 * this.h8;
    this.j8 = this.g8 * this.h8;
    this.k8 = this.j8 - this.i8;

    this.e9 = this.c9 + this.d9;
    this.f9 = this.g12 * (this.c9 / 100);
    this.g9 = this.g12 * (this.e9 / 100);
    this.i9 = this.f9 * this.h9;
    this.j9 = this.g9 * this.h9;
    this.k9 = this.j9 - this.i9;

    this.e10 = this.c10 + this.d10;
    this.f10 = this.g12 * (this.c10 / 100);
    this.g10 = this.g12 * (this.e10 / 100);
    this.i10 = this.f10 * this.h10;
    this.j10 = this.g10 * this.h10;
    this.k10 = this.j10 - this.i10;

    this.e11 = this.c11 + this.d11;
    this.f11 = this.g12 * (this.c11 / 100);
    this.g11 = this.g12 * (this.e11 / 100);
    this.i11 = this.f11 * this.h11;
    this.j11 = this.g11 * this.h11;
    this.k11 = this.j11 - this.i11;

    this.c12 = this.c6 + this.c7 + this.c8 + this.c9 + this.c10 + this.c11;
    this.d12 = this.d6 + this.d7 + this.d8 + this.d9 + this.d10 + this.d11;
    this.e12 = this.e6 + this.e7 + this.e8 + this.e9 + this.e10 + this.e11;
    this.g12 = this.f12;
    this.i12 = this.i6 + this.i7 + this.i8 + this.i9 + this.i10 + this.i11;
    this.j12 = this.j6 + this.j7 + this.j8 + this.j9 + this.j10 + this.j11;
    this.k12 = this.j12 - this.i12;

    this.i13 = this.i12 * 365;
    this.j13 = this.j12 * 365;
    this.k13 = this.j13 - this.i13;
  }
}
